Skip to content

TUI: stop clipping rows when the window is not full screen - #21

Merged
Darknode-Official merged 1 commit into
mainfrom
fix/tui-narrow-window
Nov 8, 2026
Merged

Darknode-Official merged 1 commit into
mainfrom
fix/tui-narrow-window

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

TUI: stop clipping rows when the window is not full screen

Body rows hold cols()-2 cells, but tool results, errors and tool details
were wrapped to cols()-4 and then drawn after the 5-cell " ╰─ " prefix.
That pushed every wrapped row 3 cells past the edge, where it was cut off.
The turn summary ("Wrote ... Ran 80 commands. · ...") was never wrapped.

  • wrap(text, pre) subtracts the real prefix width
  • the turn summary wraps under its ╰─ marker
  • todo rows wrap to fit their "│ [x] " prefix
  • a collapsed error shows up to 4 rows instead of 2, so the message is readable
  • the gap under the footer is kept only in tall windows (none below 34 rows)

Body rows hold cols()-2 cells, but tool results, errors and tool details
were wrapped to cols()-4 and then drawn after the 5-cell "  ╰─ " prefix.
That pushed every wrapped row 3 cells past the edge, where it was cut off.
The turn summary ("Wrote ... Ran 80 commands. · ...") was never wrapped.

- wrap(text, pre) subtracts the real prefix width
- the turn summary wraps under its ╰─ marker
- todo rows wrap to fit their "│ [x] " prefix
- a collapsed error shows up to 4 rows instead of 2, so the message is readable
- the gap under the footer is kept only in tall windows (none below 34 rows)
@Darknode-Official
Darknode-Official merged commit 765b2c0 into main Nov 8, 2026
6 checks passed
@Darknode-Official
Darknode-Official deleted the fix/tui-narrow-window branch November 8, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant